import React,{Component} from 'react';
function withHeader(WrappedComponent) {
    return class extends Component {
        render() {
            return (
                <div style={{background:'red'}}>
                    <WrappedComponent/>
                    调用函数之后我变成了高级组件，而且背景颜色变成了红色
                </div>
            );
        }
    }
}
class TestDemo extends Component{
    render() {
        return (
            <div>
                我是初始组件
            </div>
        );
    }
}
const one = withHeader(TestDemo);
export default one;
